﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PBDesk.Framework.Log4NetWrapper
{
	/// <summary>
    /// Arguments to the log event.
	/// </summary>
    public class LogEventArgs : EventArgs
	{
		#region Public Properties

		/// <summary>
		/// The type of event log.
		/// </summary>
		public LogType LogType { get; set; }

		/// <summary>
		/// The message that is logged. You should not modify the message in your event handler, because the logging already has occured.
		/// </summary>
		public object Message { get; set; }

		/// <summary>
		/// The Exception that occured.
		/// </summary>
		public Exception Error { get; set; }

		#endregion

		#region Constructors

		/// <summary>
		/// Constructor.
		/// </summary>
		public LogEventArgs(LogType type, object message, Exception t )
		{
			this.LogType = type;
			this.Message = message;
			this.Error = t;
		}

		/// <summary>
		/// Constructor.
		/// </summary>
		public LogEventArgs(LogType type, object message )
		{
			this.LogType = type;
			this.Message = message;
			this.Error = null;
		}

		/// <summary>
		/// Constructor.
		/// </summary>
		public LogEventArgs( LogType type )
		{
			this.LogType = type;
			this.Message = null;
			this.Error = null;
		}

		/// <summary>
		/// Constructor.
		/// </summary>
		public LogEventArgs()
		{
			this.LogType = LogType.Unknown;
			this.Message = null;
			this.Error = null;
		}
		#endregion
	}
}
